package com.xframe.xdal.core.tran;


import java.sql.Connection;

/**
 * 事务隔离级别
 *
 * @author xufeng
 * @version 1.0
 * @date 2022-09-26
 */
public class TransactionIsolation {
    /**
     * 驱动不支持事务
     */
    public static final int TRANSACTION_NONE = Connection.TRANSACTION_NONE;
    /**
     * 允许脏读、不可重复读和幻读。
     */
    public static final int TRANSACTION_READ_UNCOMMITTED = Connection.TRANSACTION_READ_UNCOMMITTED;

    /**
     * 禁止脏读，但允许不可重复读和幻读(默认值 = 2)
     */
    public static final int TRANSACTION_READ_COMMITTED = Connection.TRANSACTION_READ_COMMITTED;

    /**
     * 禁止脏读和不可重复读，单运行幻读。
     */
    public static final int TRANSACTION_REPEATABLE_READ = Connection.TRANSACTION_REPEATABLE_READ;

    /**
     * 禁止脏读、不可重复读和幻读。
     */
    public static final int TRANSACTION_SERIALIZABLE = Connection.TRANSACTION_SERIALIZABLE;
}
